package com.king.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.king.entity.MPost;
import com.baomidou.mybatisplus.extension.service.IService;
import com.king.vo.MPostVo;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author KING
 * @since 2020-09-01
 */
public interface MPostService extends IService<MPost> {

    IPage paging(Page page, Long categoryId, Long userId, Integer level, Boolean recommend, String order);

    MPostVo selectOnePost(QueryWrapper<MPost> wrapper);

    void initWeekRank();

    void updateCommentCountAndUnionForWeekRank(long postId,boolean isIncr);

    void putViewCount(MPostVo vo);
}
